//
//  SharedItem.swift
//  mlz
//
//  Created by 吕凌 on 2018/4/20.
//  Copyright © 2018年 吕凌. All rights reserved.
//

import Foundation

class SharedItem: NSObject, UIActivityItemSource {
    
    var img: UIImage?
    var path: URL?
    
    func activityViewControllerPlaceholderItem(_ activityViewController: UIActivityViewController) -> Any {
        return self.img as Any
    }
    
    func activityViewController(_ activityViewController: UIActivityViewController, itemForActivityType activityType: UIActivityType?) -> Any? {
        return self.path
    }

    init(data img: UIImage?, andFile file: URL?) {
        super.init()
        self.img = img
        self.path = file
    }
}
